package com.niit.agricstore.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.niit.agricstore.entity.Picture;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface PictureService extends IService<Picture> {
    // 根据 productID 查询图片
    List<Picture> getImagesByProductId(Long productId);

    // 根据 ID 查询图片
    Picture getImageById(Long id);

    // 上传图片
    Picture uploadImage(MultipartFile file, Long productId) throws IOException;

    // 删除图片
    void deleteImage(Long id);

    Picture getMainImageById(Long id);
}
